Technical Q&As
NW 43 - Changing IP Numbers under Open Transport (27-November-96)
Q
If my web server is running along happily under OT (1.1 or 1.1.1), and the
listener was bound to address 0.0.0.0, what happens when someone uses the
control panel and changes the IP number? Right now it appears to just make
the listener go deaf. I don't appear to receive connections on the new IP
number, and if I use the control panel a second time to switch back to the
original IP number, I don't get connections for that IP number either.
Is there some event that gets sent to the listener that I'm not looking
for that tells me when this happens?
A
When an port changes its IP number, it is actually closing and re-opening.
When OT closes a port, any endpoint that is plumbed to it is also closed,
hence you will get no further events on that endpoint.
The first thing you need to do is check for the provider events such as
kOTProviderWillClose and kOTProviderIsClosed.
You should also use the OTRegisterAsClient call and register a notifier
for client events, such as kOTPortDisabled, kOTPortEnabled,
kOTPortOffline, kOTPortOnline, kOTClosePortRequest, kOTYieldPortRequest,
kOTNewPortRegistered.
You need to close up your endpoints and rebind them when the
interface changes.
Q
How does any of this relate to eventual multi-homing? I assumed that if I
bound to 0.0.0.0, I would be active on all interfaces and all their IP
numbers for the life of the listener endpoint... doesn't look like that
would be the case.
A
As far as multi-homing is concerned, we will have to wait for OT 1.5 to be
certain about how that will behave.
--Vinnie Moscaritolo
Worldwide Developer Technical Support
Technical Q&As
Previous Question |
Next Question |
Contents
To contact us, please use the Contact Us page.